<template>
	<view class="page">
	   <view class="u-flex u-row-between u-flex-warp"  style="padding: 0 20rpx;background: #fff;">
	   	<view @click="go(item)" v-for="(item,index) in list" :key="index" class="boxShadow" style="margin-top: 20rpx ; border-radius: 0 0 20rpx 20rpx;">
	   		<view>
	   			<image :src="item.cover" style="width: 350rpx;height: 200rpx;border-radius: 20rpx 20rpx 0 0 ;"></image>
	   		</view>
	   		<view class="u-padding-20">
	   			<view>{{item.goodsName}}</view>
	   			<view class="u-type-error u-margin-top-20">￥{{item.price}}</view>
	   		</view>
	   		
	   	</view>
	   </view>
	</view>
</template>

<script>
	import loader from '@/common/loadPage.js';
	export default {
		mixins: [loader],
		data() {

			return {
				list: [],
				initial: {
					geturl: "/index/goods",
					parm: {
					 
					},
					isPage: true
				},

			}
		},
		async onLoad() {
		
			this.getGoods()
		},
		methods: {
		 go(item){
		 	uni.navigateTo({
		 		url:'./detail?id='+item.id
		 	})
		 },
		}
	}
</script>


<style>

	.list{
		background: #fff;
	    width:700rpx;
		 margin: 20rpx auto;
		 padding: 20rpx;
	}
</style>
